home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / tcoop10a.zip / DOC.ZIP / CONTROL.DOC < prev    next >
Text File  |  1991-11-20  |  4KB  |  89 lines

  1. CONTROL.DOC     11/20/91        Copyright (c) 1991 by James S. Clark
  2. ==========================================================================
  3. CONTROL
  4. Control Class
  5. --------------------------------------------------------------------------
  6. Class Name                      Control
  7. Superclass                      <none>
  8. Category                        Desktop
  9. Other classes referenced        Window
  10. Other catagories referenced     <none>
  11. Used by                         many
  12. Inherited by                    <none>
  13. Maturity Index                  very low
  14.  
  15. Declaration                     Control *control = new Control(  );
  16. Instance Variables
  17.                                 int     type
  18. Instance Methods
  19.                                 Control (Window *theWindow, int type,
  20.                                             char *title, int x, int y,
  21.                                             int flag, int val, colors *clr);
  22.                                 int     draw    (int hilight);
  23.                                 int     fieldedit();
  24.                                 int     setstr  (char *str);
  25.                                 int     settitle(char *title);
  26.                                 int     setvalue(int val);
  27.                                 int     getstr  (char *str);
  28.                                 int     getvalue();
  29. --------------------------------------------------------------------------
  30. GENERAL DESCRIPTION
  31.  
  32. The Control Class provides an interface for creating and using buttons,
  33. check boxes, text fields, or other controls type you derive from it.
  34. In this version the control type governs the control methods used to
  35. display and operate the control.  In future versions new controls will
  36. be derived from the control class.  None will be built-in as they are
  37. now.
  38.  
  39. --------------------------------------------------------------------------
  40. VARIABLES
  41.  
  42. int     type;
  43.         The control type number.
  44.  
  45. --------------------------------------------------------------------------
  46. METHODS
  47.  
  48. Control (Window *theWindow, int type, char *title, int x, int y,
  49.                             int flag, int val, colors *clr);
  50.         Creates a new control with the selected values and displays it in
  51.         the given window.
  52.  
  53. int     draw    (int hilight);
  54.         Re-draws the control, highlighted if the flag is set.
  55.  
  56. int     fieldedit();
  57.         Allows you to edit the control's string using this simple line
  58.         editing function.  The user must hit enter or escape to exit the
  59.         field editing method.
  60.  
  61. int     getstr  (char *str);
  62.         Returns a pointer to the control's string.
  63.  
  64. int     getvalue();
  65.         Returns the control's value.
  66.  
  67. int     setstr  (char *str);
  68.         Sets the control string to a new string.
  69.  
  70. int     settitle(char *title);
  71.         Changes the control title.
  72.  
  73. int     setvalue(int val);
  74.         Sets the value of the control.
  75.  
  76. --------------------------------------------------------------------------
  77. CONTROL TYPES
  78.  
  79. C_BUTTON        Standard button type.  Returns when selected.
  80. C_CHECK         Check box type.  Toggles on and off when selected.
  81. C_DIAL          Dial type.  Display horizontal bar indicator.
  82. C_FIELD         Test field type.  Allows user editing when selected.
  83. C_SCROLL        Scroll bar type.  Returns scaled position values.
  84.  
  85. --------------------------------------------------------------------------
  86. CONTROL.DOC                     Copyright (c) 1991 by James S. Clark
  87. ==========================================================================
  88.  
  89.